Step 2 - Render the reflection

In the Library > Composing > Composers use composers and render passes to set the rendering in your project. For example, by setting in a render pass the Object Source property you set which nodes you want to render. By default the Object Source property of a render pass is Root Object Source, which passes for rendering all nodes in the project to the render pass.

To create reflections you need two render passes, one rendering the origin nodes and the other rendering the reflections of the origin nodes represented by the Instantiator nodes you created in the previous step.

In the previous step you tagged the nodes in your project. In this step you first create two tag filters: one to collect all origin objects (tagged Origin), the other to collect all Instantiator nodes you use for reflections (tagged Reflection). Then you create two render passes: one to render all origin objects and the other to render all reflections.

  1. In the Librarypress Alt and right-clickComposing, select Tag Filter, name it Origin and in the Properties set:This is the filter that collects the nodes for which you are creating a reflection.
  2. In the Librarypress Alt and right-click Composing, select Tag Filter, name it Reflection, and in the Properties set the Included Tags property to Reflection.
    This is the filter that collects the Instantiator nodes that make a reflection.
  3. In the Library press Alt and right-click Composing and select Composer.
    Here and in the following steps you create a composer with render passes that render the origin node and their reflections.
  4. In the Librarypress Alt and right-click Composing > Composers > Composer, select Render Pass, name it Reflection, and in the Properties set:This way you create a render pass that renders the reflection.
  5. In the Librarypress Alt and right-click Composing > Composers > Composer, select Render Pass, name it Origin, and in the Properties set: This way you create a render pass that renders the origin nodes.

    Always place the render pass that renders the origin nodes below the render pass that renders their reflections.
  6. In the Project select the Scene node and in the Properties set the Composer property to the composer you created in the previous step.
  7. (Optional) In the Project select the Reflection plane node, and in the Properties adjust the Ambient Color and Blend Intensity properties until you get the reflection plane you want.
    For example, to make the reflection plane blend with the background, adjust the Ambient Color property.

< PREVIOUS STEP

What's next?

In this tutorial you learned how to create reflections in Kanzi Studio. Now you can:

See also

To learn more about creating Kanzi applications, see Tutorials.

To find out more about Kanzi Studio features, see Working with ....

To find out more about how to use tag filters, see Using Tag Filter filters.

To find out more about filters, see Filters.

To find out more about rendering in Kanzi Studio, see Rendering.